<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="chtml" uri="http://www.szhelper.com/jsp/html"%>
<%@include file="/page/common/public.jspf"%>
<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>金融/服务机构/政府机构基本信息设置</title>
<link rel="stylesheet" type="text/css" href="${path}/css/base.css"/>
<link rel="stylesheet" type="text/css" href="${path}/css/layout.css"/>
<script type="text/javascript" src="${path}/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript">
	$(function(){
		var $$ = function (id) {
			return document.getElementById(id);
			}
			window.onload = function () {
			var btnSelect = $$("btn_select");
			var curSelect = btnSelect.getElementsByTagName("span")[0];
			var oSelect = btnSelect.getElementsByTagName("select")[0];
			var aOption = btnSelect.getElementsByTagName("option");
			oSelect.onchange = function () {
			var text=oSelect.options[oSelect.selectedIndex].text;
			curSelect.innerHTML = text;
			}
			} 	
		})
		
		// userInfo数据列表表单提交脚本
		function _submitAction4userInfo(obj, action, params) {
			var submitForm;
			while ((obj.parentNode) && (obj.parentNode.tagName)
					&& (!obj.parentNode.tagName.match(/FORM/i))) {
				obj = obj.parentNode;
			}
			submitForm = obj.parentNode;
			if (!submitForm) {
				submitForm = document.createElement("form");
				document.body.appendChild(submitForm);
			}
			submitForm.setAttribute("action", action);
			submitForm.setAttribute("method", "POST");
			for ( var key in params) {
				var hiddenField = document.createElement("input");
				hiddenField.setAttribute("type", "hidden");
				hiddenField.setAttribute("name", key);
				hiddenField.setAttribute("value", params[key]);
				submitForm.appendChild(hiddenField);
			}
			if (submit4userInfo()) {
				submitForm.submit();
			}
				
		}
	function submit4userInfo() {
		var realName = $("input[name='realName']").val();
		var organizeCode = $("input[name='organizeCode']").val();
		var workaddress = $("input[name='workaddress']").val();
		var mainbussiness = $("input[name='mainbussiness']").val();
		
		if (realName == null || realName == "") {
			alert("请输入机构全称");
			return false;
		}
		if (organizeCode == null || organizeCode == "") {
			alert("请输入组织机构代码");
			return false;
		}
		if (workaddress == null || workaddress == "") {
			alert("请输入办公地址");
			return false;
		}
		if (mainbussiness == null || mainbussiness == "") {
			alert("请输入主营业务");
			return false;
		}
		return true;
	}
</script>
</head>

<body bgcolor="#f9f9f9">
         <!-- head -->
		<c:import url="../include/top.jsp"></c:import>
    	<!--主体-->
    	
        	<div class="companyBox" style="width: 74%">
            	<div class="companyState">
                	<ul>
                    	<li>当前账户状态：<font>${user.status.text}</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    	您的账户类型：<font>金融/服务机构/政府机构用户</font></li>
                        <li>尊敬的<font>${user.userName }</font>：
                        	感谢注册PPP金融服务网，您需完善详细信息后才能使用PPP金融服务网用户中心的各项功能。
                        	<input type="button" class="greenBtn w86" value="以后再说" onclick="" /></li>
                    </ul>
                    <ul>
                    	<div class="companyBoxRight" style="width: 100%">
		                	<p>说明：提交基本信息是您使用PPP金融服务网各项服务的最基本要求，请务必填写完整并保证信息的真实性。通过审核后，您即可享受除融资外的各项服务，
		                	如您有融资的需求，则进一步完善企业更多信息。</p>
		                </div>
                    </ul>
                </div>
			</div>
			<form id="userInfo" action="<%=request.getContextPath()%>/registerSave.htm"
			method="POST" onsubmit="return submit4userInfo();">
			<input type="hidden" name="id" id="id" value="${user.id}"/>
			<input type="hidden" name="mobile" id="mobile" value="${user.mobile}"/>
			<input type="hidden" name="email" id="email" value="${user.email}"/>
			<input type="hidden" name="password" id="password" value="${user.password}"/>
			<input type="hidden" name="pwdAttach" id="pwdAttach" value="${user.pwdAttach}"/>
			<input type="hidden" name="version" id="version" value="${user.version}"/>
			<input type="hidden" name="userName" id="userName" value="${user.userName}"/>
			<input type="hidden" name="loginSucNum" id="loginSucNum" value="${user.loginSucNum}"/>
			<input type="hidden" name="loginFailNum" id="loginFailNum" value="${user.loginFailNum}"/>
			<input type="hidden" name="status" id="status" value="${user.status}"/>
			<input type="hidden" name="type" id="type" value="FINANCEDEPT"/>
			<input type="hidden" name="financedeptType" id="financedeptType" value="${financedeptType }"/>
            <input type="hidden" name="isEmailCheck" id="isEmailCheck" value="${user.isEmailCheck }"/>
			<input type="hidden" name="isMobileCheck" id="isMobileCheck" value="${user.isMobileCheck }"/>
			<input type="hidden" name="cardNumber" id="cardNumber" value="${user.cardNumber }"/>
			<input type="hidden" name="registerFrom" id="registerFrom" value="${user.registerFrom }"/>
			<input type="hidden" name="activeCode" id="activeCode" value="${user.activeCode }"/>
			<input type="hidden" name="isOpenAccount" id="isOpenAccount" value="${user.isOpenAccount }"/>
            
            
            <div class="wrap f_yh">
        	 <div class="registeredBox" style="margin-top: 0px;border: 1px solid #DFE0E4;border-top-width: 0">
            	<div class="borrow_list_cont f_yh">
            	
            	
                	<table cellpadding="0" cellspacing="0" style="width: 100%">
                		<tr>
                            <td colspan="2" class="title_bg"><span></span>金融/服务机构/政府机构用户信息</td>
                        </tr>
                    	<tr>
                        	<td class="tAlign_r">机构类型：</td>
                            <td colspan="3">
                            		<c:set value="${fn:split(financedeptType, ',') }" var="str1" />
									<c:forEach items="${str1}" var="s">
										<c:choose>
											<c:when test="${s eq 'type1' }">银行</c:when>
											<c:when test="${s eq 'type2'}">信托公司</c:when>
											<c:when test="${s eq 'type3' }">证券公司</c:when>
											<c:when test="${s eq 'type4' }">担保公司</c:when>
											<c:when test="${s eq 'type5' }">资产管理公司</c:when>
											<c:when test="${s eq 'type6' }">小额贷款公司</c:when>
											<c:when test="${s eq 'type7' }">融资租赁公司</c:when>
											<c:when test="${s eq 'type8' }">保险公司</c:when>
											<c:when test="${s eq 'type9' }">基金公司</c:when>
											<c:when test="${s eq 'type10' }">会计师事务所</c:when>
											<c:when test="${s eq 'type11' }">律师事务所</c:when>
											<c:when test="${s eq 'type12' }">咨询企业</c:when>
											<c:when test="${s eq 'type13' }">招标代理公司</c:when>
										</c:choose>
									</c:forEach>
                            </td>
                        </tr>
                    	<tr>
                        	<td class="tAlign_r">是否政府机构：</td>
                            <td colspan="3">
								<select name="isGov">
                            		<option value="YES">是</option>
                            		<option value="NO">否</option>
                            	</select>
                            </td>
                        </tr>
                        <tr>
                        	<td class="tAlign_r"><span style="color: red;">*</span>机构全称：</td>
                            <td colspan="3">
                            	<div class="companyBox_greyBox_text"><input type="text"  name="realName"  value="" /></div>
                            </td>
                        </tr>
                        <tr>
                        	<td class="tAlign_r"><span style="color: red;">*</span>组织机构代码：</td>
                            <td>
                            	<div class="companyBox_greyBox_text"><input type="text"  name="organizeCode"  value="" /></div>
                            </td>
                        </tr>
                        <tr>
                        	<td class="tAlign_r"><span style="color: red;">*</span>办公地址：</td>
                            <td colspan="3">
                            	<div class="companyBox_greyBox_text"><input type="text"  name="workaddress"  value="" /></div>
                            </td>
                        </tr>
                        <tr>
                        	<td class="tAlign_r"><span style="color: red;">*</span>主营业务：</td>
                            <td>
                            	<div class="companyBox_greyBox_text"><input type="text"  name="mainbussiness"  value="" /></div>
                            </td>
                        </tr>
                        <tr>
                        	<td class="tAlign_r">金融牌照/相关资质：</td>
                            <td colspan="3">
                            	<div class="companyBox_greyBox_text"><input type="text"  name="dsf"  value="" /></div>
                            </td>
                        </tr>
                         
                        <tr>
                        	<td class="tAlign_r"></td>
                            <td colspan="3">企业联系人一：
                            </td> 
                        </tr>
                        <tr>
                        	<td class="tAlign_r">姓名：</td>
                            <td colspan="3">
                            	<div class="registeredBox_greyBox_text"><input type="text"  name="linkman_one_name"  value=" " /></div>
                            </td>
                        </tr>
                        <tr>
                        	<td class="tAlign_r">职务：</td>
                            <td colspan="3">
                            	<div class="registeredBox_greyBox_text"><input type="text"  name="linkman_one_duty"  value=" " /></div>
                            </td>
                        </tr>
                        <tr>
                        	<td class="tAlign_r">邮箱：</td>
                            <td colspan="3">
                            	<div class="registeredBox_greyBox_text"><input type="text"  name="linkman_one_email"  value=" " /></div>
                            </td>
                        </tr>
                        <tr>
                        	<td class="tAlign_r">联系电话：</td>
                            <td colspan="3">
                            	<div class="registeredBox_greyBox_text"><input type="text"  name="linkman_one_tel"  value=" " /></div>
                            </td>
                        </tr>
                        <tr>
                        	<td class="tAlign_r"></td>
                            <td colspan="3">企业联系人二：
                            </td> 
                        </tr>
                        <tr>
                        	<td class="tAlign_r">姓名：</td>
                            <td colspan="3">
                            <div class="registeredBox_greyBox_text"><input type="text"  name="linkman_two_name"  value=" " /></div></td>
                        </tr>
                        <tr>
                        	<td class="tAlign_r">职务：</td>
                            <td colspan="3">
                            	<div class="registeredBox_greyBox_text"><input type="text"  name="linkman_two_duty"  value=" " /></div>
                            </td>
                        </tr>
                        <tr>
                        	<td class="tAlign_r">邮箱：</td>
                            <td colspan="3">
                            	<div class="registeredBox_greyBox_text"><input type="text"  name="linkman_two_email"  value=" " /></div>
                            </td>
                        </tr>
                        <tr>
                        	<td class="tAlign_r">联系电话：</td>
                            <td colspan="3">
                            	<div class="registeredBox_greyBox_text"><input type="text"  name="linkman_two_tel"  value=" " /></div>
                            </td>
                        </tr>
                       
                        <tr>
                        	<td colspan="4" class="tAlign_c">
	                        	<input type="button" onclick="javascript:if(true){void(_submitAction4userInfo(this,'<%=request.getContextPath()%>/registerSave.htm',{}));return false;}" 
	                        	class="bt_ty s_20" style="width: 20%;padding: 15px" value="保存" />&nbsp;&nbsp;&nbsp;&nbsp;
	                        	<input type="button" onclick="javascript:void(history.back(-1))" 
	                        	class="bt_ty s_20" style="width: 20%;padding: 15px"  value="返回"/>
                        	</td>
                        </tr>
                    </table>
                </div>
                </div>
                </div>
                
                <div class="clear_both"></div>    
            </form>
        </div>
    	<!--主体-->
    	<!--foot-->
        <c:import url="../include/foot.jsp"></c:import>
        <!--foot--> 
	</div>    
</body>
</html>